** Now change the variables below to whatever fits for your setup.
**
** Notes: YAM must be running for the script to work
** Known bug(s):
** The script won't send the mail if YAM wasn't already running when you
** started the script and you have "Get mail on startup" turned on. To
** fix this, turn off that flag in YAM's configs.
*/
AddSignature = 'Yes' /* use YAM's signature */
PopOnVScreen = 'No' /* pop TTX on V's pubscreen?*/
Editor = 'Turbotext:TTX' /* path/name of the editor */
Subject = 'Mailto: from your URL' /* subject for the message */
YAMPath = 'YAM:' /* must end with : or / */
parse arg mailto
/* check for the presence of Libs:rexxsupport.library */
if ~show('L','rexxsupport.library') then do
if addlib('rexxsupport.library',0,-30,0) then nop
else do
call showerror('This script needs the rexxsupport.library to work properly. This file can be found on your original Workbench 2+ disks and should be placed in Libs:')
exit 20
end
end
/* add YAM's signature if YAM:.signature file exists */
if(upper(AddSignature) = 'YES') then do
if exists(YAMPath'.signature') then
shell command 'copy 'YAMPath'.signature t:mail'
else
do call showerror('No signature file found! Please correct this in YAM or turn off signature adding in MailTo-YAM.VRX<BR>You should also check the YAMPath in MailTo-YAM.VRX')
exit 20
end
end
/* send the mail from YAM */
call pragma('stack',10000)
if upper(PopOnVScreen) = 'YES' then
address command (editor' -wait t:mail')
else address command (editor' wait t:mail')
/* look for YAM process */
if ~show('P','YAM') then do
shell command 'Run <>NIL: YAM:YAM'
do until show('P','YAM')
call delay(50) /* needs rexxsupport.library */
end
end
address YAM
WriteMailTo mailto
'WriteSubject "'Subject'"'
WriteLetter 'T:Mail'
WriteQueue
MailSendAll
call delete('t:mail') (rexxsupport.library)
EXIT
/* sophisticated errorhandling (ripped from MailTo-THOR.VRX) :-) */